<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>
<body>
<div id="app">
    <span>{{msg}}</span>
    <hr>
    <button v-on:click="fun">点击</button>
    <!--上面的v-on：缩写为@-->
    <button @dblclick="fun2">点击2</button>
</div>
</body>
<script>
    let app = new Vue({
        el:"#app",
        /* 数据 */
        data:{
            msg:"<font color='red'>今天学习vue</font>",
        },
        //定义方法
            methods:{
                fun(){
                    //this表示vue对象
                    this.msg="我喜欢打篮球"
                },
                fun2(){

                }
            }
        })
</script>
</html>